﻿namespace BLL
{
    using DAL;
    using System;
    using System.Data;
    using System.Data.SqlClient;

    public class statusController
    {
        private ConnectionManager connMgr = new ConnectionManager();

        public DataTable GetAll()
        {
            SqlCommand qryX = new SqlCommand("SELECT Status, DescStatus, DescFull FROM StatusList");
            return this.connMgr.doReader(qryX);
        }

        public DataRow GetStatusInfo(char Status)
        {
            SqlCommand qryX = new SqlCommand("SELECT DescStatus, DescFull FROM StatusList WHERE Status = @Status");
            qryX.Parameters.AddWithValue("@Status", Status);
            return this.connMgr.doReader(qryX).Rows[0];
        }
    }
}

